package com.googlecode.linkmein.domain.revision

import com.googlecode.linkmein.domain.Employee
import com.googlecode.linkmein.domain.Project

public class Change {
    Date createdAt;
}

public class EmployeeChange extends Change {
    Employee employee;
}

public class NewEmployeeChange extends EmployeeChange {
    public String toString(personDecorator, projectDecorator) {
        return "We have a new member, " + personDecorator(employee) + " just joined us, let's go to say Hi"
    }
}

public class EmployeeQuitChange extends EmployeeChange {
    public String toString(personDecorator, projectDecorator) {
        return "Very sadly, " + personDecorator(employee) + " has quit ThoughtWorks China"
    }
}

public class ProjectChange extends Change {
    Project project
}

public class NewProjectChange extends ProjectChange {
    public String toString(personDecorator, projectDecorator) {
        return "We have a new project " + projectDecorator(project.name) + ", have a check on it"
    }
}

public class ProjectEndChange extends ProjectChange {
    public String toString(personDecorator, projectDecorator) {
        return "Project " + projectDecorator(project.name) + " has ended"
    }
}

